package com.farm.project.domain.ex;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.StringUtils;

/**
 * 流程图关系连线
 * 
 * @author Wd
 *
 */
public class EchartsTaskLink {
	private String source;
	private String target;
	private Map<String, Object> label;

	public EchartsTaskLink(String source, String target) {
		super();
		this.source = source;
		this.target = target;
	}

	public EchartsTaskLink(String source, String target, String lable) {
		super();
		this.source = source;
		this.target = target;
		if (StringUtils.isNotBlank(lable)) {
			label = new HashMap<String, Object>();
			Map<String, Object> textStyle = new HashMap<String, Object>();
			textStyle.put("fontSize", 12);
			Map<String, Object> normal = new HashMap<String, Object>();
			normal.put("show", true);
			normal.put("formatter", lable);
			normal.put("textStyle", textStyle);
			label.put("normal", normal);
		}
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public Map<String, Object> getLabel() {
		return label;
	}

	public void setLabel(Map<String, Object> label) {
		this.label = label;
	}

}
